Skip to content

Improve scoring and parallel extraction performance (v6.0.2) - #37

Merged
ycherkes merged 6 commits into
masterfrom
codex/performance-tuning-2026-11-14
Nov 14, 2026
Merged

ycherkes merged 6 commits into
masterfrom
codex/performance-tuning-2026-11-14

Conversation

@ycherkes

Copy link
Copy Markdown
Contributor

Summary

  • Reuse indexed choices in parallel extraction to avoid copying arrays and lists.
  • Pool parallel top-N score buffers while preserving existing result and tie ordering.
  • Skip weighted-ratio branches when the base score already exceeds their maximum, and avoid cloning the cached token set on each score.
  • Add regression tests, a high-similarity benchmark, cache-usage guidance, and a detailed performance report.

Benchmarks

Measured on Windows 11, .NET 10, BenchmarkDotNet in-process:

  • Parallel ExtractOne on 100,000 choices, cutoff 0: 429.0 → 297.7 µs; allocation 803,612 → 2,544 B.
  • Parallel top-N on 100,000 choices, cutoff 0: 660.9 → 456.9 µs; allocation ~786 KB → ~4 KB.
  • Reused cached TokenSetRatio: 320.8 → 202.6 ns; allocation ~1.23 KB → 976 B.
  • Exact weighted ratio versus the full-evaluation benchmark: 877.6 → 22.8 ns; allocation 2,464 → 80 B.

Before/after runs were separate in-process measurements, and the high-similarity comparison ran within one benchmark job. Full setup and additional cases are in docs/performance-testing-2026-11-14.md.

Validation

  • 5,145 tests passed on .NET 8 and .NET 10.
  • Library built for all configured target frameworks.
  • git diff --check passed.

The configured out-of-process benchmark harness could not build in the restricted testing environment, so its NA rows were excluded.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-14T14:46:43.009149Z cc5747a PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cc5747af04

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ycherkes ycherkes changed the title Improve scoring and parallel extraction performance Improve scoring and parallel extraction performance (v6.0.2) Nov 14, 2026
@ycherkes
ycherkes merged commit aab9111 into master Nov 14, 2026
2 checks passed
@ycherkes
ycherkes deleted the codex/performance-tuning-2026-11-14 branch November 14, 2026 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant